Skip to content

Conversation

HarryFQG
Copy link
Contributor

@HarryFQG HarryFQG commented Mar 22, 2025

A constructor in HttpClientSseClientTransport overloading

Motivation and Context

Repair WebMvcSseServerTransport specifies the sseEndpoint, while HttpClientSseClientTransport SSE_ENDPOINT or/sse, finally an error. Below is a screenshot.

How Has This Been Tested?

There are tests. The test steps are as follows:

Step 1. Create WebMvcSseServerTransport and specify sseEndpoint. For example, "new WebMvcSseServerTransport(new ObjectMapper(), "/myMcp/message", "/mysse");" .

Step 2.
When creating "McpSyncClient" objects, we should specify "WebFluxSseClientTransport" or "HttpClientSseClientTransport" object and then you find there the lack of "sseEndpoint" parameter.

Step 3. There is "Java. Lang. RuntimeException: Failed to connect to SSE stream. Unexpected status code: 404" error.
If McpClient use WebFluxSseClientTransport will quote "under Caused by: org.springframework.web.reactive.function.client.WebClientResponseException$NotFound: 404 Not Found from the GET http://localhost:18080/sse " error.

Breaking Changes

It isn't necessary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@HarryFQG HarryFQG changed the title A constructor in HttpClientSseClientTransport overloading In HttpClientSseClientTransport and WebFluxSseClientTransport add a constructor Mar 22, 2025
tzolov added a commit that referenced this pull request Mar 27, 2025
…, #67)

Enhances WebFlux SSE transport implementation with customizable endpoint paths:
- Add configurable SSE endpoint support in both client and server transports
- Update tests to verify custom SSE endpoint functionality
- Implement builder pattern to support the new configuration options

Co-authored-by: haidao <[email protected]>
Co-authored-by: Harry <[email protected]>
Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 0.9.0 milestone Mar 27, 2025
@tzolov tzolov self-assigned this Mar 27, 2025
@tzolov
Copy link
Contributor

tzolov commented Mar 27, 2025

Thank you @HarryFQG I've applied some of your changes as part of 55ee156 making you a co-author

@tzolov tzolov closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants